<template>
  <div>
    <div class="true-or-false topic-title">
      <!-- <span class="order">{{ topic.order || "" }}.&nbsp;</span> -->
      <span class="stem"
        ><span style="color: #a8a8b3">(判断题)</span>
        <edit-block :content="topic.title" :blockType="`title`"></edit-block>
      </span>
      <div class="judge-erea">
        <el-radio-group v-model="judgeRes">
          <el-radio-button label="是"></el-radio-button>
          <el-radio-button label="否"></el-radio-button>
        </el-radio-group>
      </div>
    </div>
    <!-- 解释 -->
    <explain-edit-block :explain="topic.explain"></explain-edit-block>
  </div>
</template>

<script>
import EditBlock from "@/components/EditBlock.vue";
import ExplainEditBlock from "../ExplainEditBlock.vue";
import { mixin } from "@/mixin";
/**
 *
 */
// 逻辑结构：题号. 命题 单选框（yes or no）
export default {
  components: { EditBlock, ExplainEditBlock },
  mixins: [mixin],
  data() {
    return {
      topicTemplate: {
        title: "1+1=2?",
        judgeRes: "",
        explain: "默认解析",
      },
      questionType: "tof",
      judgeRes: "是",
    };
  },
  watch: {
    judgeRes(v) {
      // console.log(v);
      this.$store.commit("topicAbout/SET_CORRECT", v);
    },
  },
};
</script>

<style lang='less' scoped>
.true-or-false {
  display: flex;
  height: 40px;
  span {
    line-height: 40px;
  }
  .judge-erea {
    margin-left: 20px;
  }
}
</style>